/*
 * DRACOON API
 * REST Web Services for DRACOON<br><br>This page provides an overview of all available and documented DRACOON APIs, which are grouped by tags.<br>Each tag provides a collection of APIs that are intended for a specific area of the DRACOON.<br><br><a title='Developer Information' href='https://developer.dracoon.com'>Developer Information</a>&emsp;&emsp;<a title='Get SDKs on GitHub' href='https://github.com/dracoon'>Get SDKs on GitHub</a><br><br><a title='Terms of service' href='https://www.dracoon.com/terms/general-terms-and-conditions/'>Terms of service</a>
 *
 * OpenAPI spec version: 4.45.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package ch.cyberduck.core.sds.io.swagger.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.v3.oas.annotations.media.Schema;
/**
 * User credentials
 */
@Schema(description = "User credentials")

public class LoginRequest {
  @JsonProperty("password")
  private String password = null;

  @JsonProperty("userName")
  private String userName = null;

  /**
   * Authentication methods
   */
  public enum AuthTypeEnum {
    BASIC("basic"),
    ACTIVE_DIRECTORY("active_directory"),
    RADIUS("radius");

    private String value;

    AuthTypeEnum(String value) {
      this.value = value;
    }
    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }
    @JsonCreator
    public static AuthTypeEnum fromValue(String input) {
      for (AuthTypeEnum b : AuthTypeEnum.values()) {
        if (b.value.equals(input)) {
          return b;
        }
      }
      return null;
    }

  }  @JsonProperty("authType")
  private AuthTypeEnum authType = null;

  @JsonProperty("token")
  private String token = null;

  @JsonProperty("state")
  private String state = null;

  @JsonProperty("language")
  private String language = null;

  @JsonProperty("login")
  private String login = null;

  public LoginRequest password(String password) {
    this.password = password;
    return this;
  }

   /**
   * Password
   * @return password
  **/
  @Schema(required = true, description = "Password")
  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public LoginRequest userName(String userName) {
    this.userName = userName;
    return this;
  }

   /**
   * &amp;#128640; Since v4.13.0  Username
   * @return userName
  **/
  @Schema(description = "&#128640; Since v4.13.0  Username")
  public String getUserName() {
    return userName;
  }

  public void setUserName(String userName) {
    this.userName = userName;
  }

  public LoginRequest authType(AuthTypeEnum authType) {
    this.authType = authType;
    return this;
  }

   /**
   * Authentication methods
   * @return authType
  **/
  @Schema(description = "Authentication methods")
  public AuthTypeEnum getAuthType() {
    return authType;
  }

  public void setAuthType(AuthTypeEnum authType) {
    this.authType = authType;
  }

  public LoginRequest token(String token) {
    this.token = token;
    return this;
  }

   /**
   * RADIUS Token
   * @return token
  **/
  @Schema(description = "RADIUS Token")
  public String getToken() {
    return token;
  }

  public void setToken(String token) {
    this.token = token;
  }

  public LoginRequest state(String state) {
    this.state = state;
    return this;
  }

   /**
   * For RADIUS Access-Challenge  If a &#x60;replyState&#x60; is returned, it must be included as &#x60;state&#x60; in the following request.
   * @return state
  **/
  @Schema(description = "For RADIUS Access-Challenge  If a `replyState` is returned, it must be included as `state` in the following request.")
  public String getState() {
    return state;
  }

  public void setState(String state) {
    this.state = state;
  }

  public LoginRequest language(String language) {
    this.language = language;
    return this;
  }

   /**
   * &amp;#128679; Deprecated since v4.7.0  Language ID or ISO 639-1 code
   * @return language
  **/
  @Schema(description = "&#128679; Deprecated since v4.7.0  Language ID or ISO 639-1 code")
  public String getLanguage() {
    return language;
  }

  public void setLanguage(String language) {
    this.language = language;
  }

  public LoginRequest login(String login) {
    this.login = login;
    return this;
  }

   /**
   * &amp;#128679; Deprecated since v4.7.0  User login name
   * @return login
  **/
  @Schema(description = "&#128679; Deprecated since v4.7.0  User login name")
  public String getLogin() {
    return login;
  }

  public void setLogin(String login) {
    this.login = login;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    LoginRequest loginRequest = (LoginRequest) o;
    return Objects.equals(this.password, loginRequest.password) &&
        Objects.equals(this.userName, loginRequest.userName) &&
        Objects.equals(this.authType, loginRequest.authType) &&
        Objects.equals(this.token, loginRequest.token) &&
        Objects.equals(this.state, loginRequest.state) &&
        Objects.equals(this.language, loginRequest.language) &&
        Objects.equals(this.login, loginRequest.login);
  }

  @Override
  public int hashCode() {
    return Objects.hash(password, userName, authType, token, state, language, login);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class LoginRequest {\n");
    
    sb.append("    password: ").append(toIndentedString(password)).append("\n");
    sb.append("    userName: ").append(toIndentedString(userName)).append("\n");
    sb.append("    authType: ").append(toIndentedString(authType)).append("\n");
    sb.append("    token: ").append(toIndentedString(token)).append("\n");
    sb.append("    state: ").append(toIndentedString(state)).append("\n");
    sb.append("    language: ").append(toIndentedString(language)).append("\n");
    sb.append("    login: ").append(toIndentedString(login)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
